<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>

</head>
<body>
<script>
    // window.onloan 是窗口的一个事件，这个事件会等到页面元素加载完毕之后才会执行
    window.onload = function () {
        document.querySelector('#box1').innerText = 'python001'
    }
</script>

<div id="box1">
    box1
</div>
<div id="box2">
    box2
</div>

<!-- <script>
    document.querySelector('#box1').innerText='python001'
</script> -->
</body>
</html>
